const clearLogin = function(){
    console.log('清空登录');
    // store.commit('clearLogin');
    // location.reload();
};

const errCodeFn = function(data,state){
    //data.resultCode==5000
    if(data.resultMsg){ //data resultCode+resultMsg
        alert(data.resultMsg)
        return false;
    }else{ //data直接返回数组
        // tipsMessage('no resultMsg');
        return data;
    };
};

export default {
    apiHost: 'http://lmlvpn.com:7301/mock/5cd387455bd4e93250c8db6b/iview-admin/',
    httpConfig: {
        code: 'resultCode',
        msg: 'resultMsg',
        dataCode: 'data',
    },
    isAddVue: true,

    clearLogin,
    getRequestUrl: getUrl,
    getToken,
    tipsMessage,
    getSign,
    errCodeFn
}